package com.example.springvue.mapper;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springvue.model.AdminUser;
import com.example.springvue.model.AuthGroup;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface AuthGroupMapper extends BaseMapper<AuthGroup> {


    //根据id获取角色信息
    @Select("SELECT * FROM auth_group WHERE  id = #{Id} LIMIT 1")
    AuthGroup getAuthGroupInfoId(int Id);

    @Select("SELECT * FROM auth_group")
    List<Map<String,Object>>  getPageSelect();

    @Select("SELECT id as value,name as label FROM auth_group")
    List<Map<String,Object>>  getList();
    @Select("delete from auth_group where id = #{id}")
    Integer authRuleDelete(String Id);
}
